import request from '@/utils/request'
import { getApiUrl } from '@/utils/request'

var basePath = '/eqt/eqtOrder/'

export function listEqtOrder(query) {
  return request({
    url: basePath + 'list',
    method: 'get',
    params: query
  })
}

export function createEqtOrder(data) {
  return request({
    url: basePath + 'create',
    method: 'post',
    data
  })
}

export function readEqtOrder(data) {
  return request({
    url: basePath + 'read/' + data.id,
    method: 'get'
  })
}

export function updateEqtOrder(data) {
  return request({
    url: basePath + 'update',
    method: 'post',
    data
  })
}

export function deleteEqtOrder(data) {
  return request({
    url: basePath + 'delete/' + data.feuipmentid,
    method: 'delete'
  })
}

export function createEqtOrder2(data) {
  return request({
    url: basePath + 'create2',
    method: 'post',
    data
  })
}

export function updateEqtOrder2(data) {
  return request({
    url: basePath + 'update2',
    method: 'post',
    data
  })
}

export function deleteEqtOrder2(data) {
  return request({
    url: basePath + 'delete2/' + data.fentryid,
    method: 'delete'
  })
}

export function getAllEqtInfo() {
  return request({
    url: '/equipment/info/getAll',
    method: 'get'
  })
}

const uploadPath = getApiUrl() + 'eqt/eqtOrder/uploadFile'
export { uploadPath }
